function NN=plot_mass_tb(data,massge,orbge,beaming)
% ���� data �Ƿ���beamingЧӦ����1�� 
% ��ͼ ��Ⱥ���?

% data=all_rb_1(all_rb_1(:,10)==13,:);
% massge=50;
% orbge=100;
% beaming=0;
ml=11;
massline=linspace(min(data(:,ml))-0.00001,max(data(:,ml)),massge);
orbline=linspace(min(log10(data(:,14)))-0.0001,max(log10(data(:,14))),orbge);
NN=meshgrid(orbline,massline).*0;
for i= 1:length(data)
    masswei=ceil((data(i,ml)-massline(1))/(massline(2)-massline(1)));
    orbwei=ceil((log10(data(i,14))-orbline(1))/(orbline(2)-orbline(1)));
    if(beaming==1  && data(i,10)==13)
        NN(masswei,orbwei)=NN(masswei,orbwei)+data(i,20)*data(i,17);
    else
        NN(masswei,orbwei)=NN(masswei,orbwei)+data(i,20);
    end
end
pcolor(orbline,massline,log10(NN));
xlabel('log10(obrit Period)/log10(day)')
ylabel('Mass of compact/solar mass')
colorbar; colormap(jet);


end